package io.gitee.zhangbinhub.admin.workflow.notify

import io.gitee.zhangbinhub.acp.boot.exceptions.WebException
import io.gitee.zhangbinhub.acp.boot.log.LogAdapter
import io.gitee.zhangbinhub.admin.base.PendingCreatedNotify
import org.dromara.warm.flow.core.entity.Definition
import org.dromara.warm.flow.core.entity.Instance
import org.dromara.warm.flow.core.entity.Task
import org.noear.solon.annotation.Component

@Component
class LogPendingCreatedNotify(private val logAdapter: LogAdapter) : PendingCreatedNotify() {
    @Throws(WebException::class)
    override fun doTaskNotify(definition: Definition, instance: Instance, task: Task, userIdList: List<String>) {
        logAdapter.debug("【${definition.flowCode}】【${definition.flowName}】待办生成通知：taskId【${task.id}】processInstanceId【${task.instanceId}】processDefinitionId【${definition.id}】businessKey【${instance.businessId}】，userId：$userIdList")
    }
}